# 请在下面补充你的代码
import math
def fun(b,h):

    return(0.5*(b * h + h ** 2))
b = float(input())
h = float(input()) 
a = fun(b,h)
c1 = int(a/240)
print(f'弧田法计算弓形田地面积为{c1}亩零{a-c1*240:.2f}平方步')

# 半弦长
AD = b / 2
# 半径
OA = (AD ** 2 + h ** 2) / (2 * h)

# 圆心角
AOB = 2 * math.asin(AD / OA)
################Begin######################
# 弓形所在扇形的面积
sAOB = AOB / (2*math.pi) * math.pi * (OA**2)
# 三角形面积
tr = 0.5 * (OA**2) * math.sin(AOB)
# 弓形面积
area_of_arch = sAOB - tr
vars = int(area_of_arch/240)

print(f'现代方法计算弓形田地面积为{vars}亩零{area_of_arch-vars*240:.2f}平方步')
################End######################